package com.example.demo;

import com.example.demo.controller.UserContoller;
import com.example.demo.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringIoCApplication {

//	public static void main(String[] args ) {
//		ApplicationContext context = SpringApplication.run(SpringIoCApplication.class, args);
//		UserContoller bean = context.getBean(UserContoller.class);
//		bean.sayHi();//不是static对象就要先拿给对象,才能调用方法
//
//		UserService service = context.getBean(UserService.class);
//		service.sayHi();
//
//	}

}
